<?php


namespace app\common\menu;


class Common
{
    #Safety
    public const USER_ACCESS_TOKEN_EXPIRE = 3600;
    public const IP_MAX_FREQUENCY_SECONDS = 2;
    public const IP_MAX_FREQUENCY_NUMBER  = 5;
    public const IP_MAX_PULL_BLACK_NUMBER = 15;


    #Tool
    public const ONE_MINUTE_IN_SECONDS = 60;
    public const ONE_HOUR_IN_SECONDS   = 60 * 60;
    public const ONE_DAY_IN_SECONDS    = 60 * 60 * 24;
    public const ONE_WEEK_IN_SECONDS   = 60 * 60 * 24 * 7;

    /**
     * @阿里云短信模版：修改密码
     * name 用户名称
     * time 当前时间
     */
    public const SMS_ALI_TEMPLATE_CHANGE_PASSWORD = 'SMS_151547471';

    /**
     * @阿里云短信模版：注册账户
     * name 用户名称
     */
    public const SMS_ALI_TEMPLATE_REGISTER_ACCOUNT = 'SMS_151577473';

    /**
     * @腾讯云短信模板：登录
     */
    public const SMS_TENCENT_TEMPLATE_LOGIN = '600031';
}